{// 引入标签库 }
<tagLib name="fanwe" />
{// 加载头部公共文件 }
<include file="Public:header" />
<load href="__TMPL__ThemeFiles/Js/jquery.js" />
<load href="__TMPL__ThemeFiles/Js/site.js" />
<!-- 菜单区域  -->

<!-- 主页面开始 -->
<div id="main" class="main" >

<!-- 主体内容  -->
<div class="content" >
<div class="title">{$Think.lang.DATA_LIST}</div>
<!--  功能操作区域  -->
<div class="operate" >
<fanwe:imageBtn name="add" value="{$Think.lang._ADD_DATA}" click="add()" style="impBtn hMargin fLeft shadow" />
<fanwe:imageBtn name="edit" value="{$Think.lang._EDIT_DATA}" click="edit()" style="impBtn hMargin fLeft shadow" />
<fanwe:imageBtn name="delete" value="{$Think.lang._DELETE_DATA}" click="foreverdel()" style="impBtn hMargin fLeft shadow" />
<!-- 查询区域 -->
</div>
</div>
<!-- 功能操作区域结束 -->

<!-- 列表显示区域  -->
<div class="list" >
<fanwe:list 
	id="checkList" 
	name="collect" 
	style="list" 
	checkbox="true" 
	action="true" 
    isrel="false" 
	datasource="list" 
	child="true" 
	show="id:{$Think.lang.ID}|8%,name:{$Think.lang.NAME}:edit,rule_key:{$Think.lang.KEY},sort:{$Think.lang.SORT}" 
	actionlist="status|showStatus=$site['id'],edit:{$Think.lang._EDIT_DATA}:id,foreverdel:{$Think.lang._DELETE_DATA}:id" /> 
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<script type="text/javascript">
jQuery(function($){
	var bestTooltip = ["未推荐","已推荐"];
	var bestImages = ["__TMPL__ThemeFiles/Images/locked.gif","__TMPL__ThemeFiles/Images/ok.gif"];
	$("td[rel='is_best|getBest']").click(function(){
		var thisTD = $(this);							 
		var id = $("input",thisTD.parent()).val();
		
		$.ajax({
			url: APP+"?"+VAR_MODULE+"=Site&"+VAR_ACTION+"=updateIsBest&id="+id,
			cache: false,
			success:function(data)
			{
				if(data != "err")
				{
					$("img",thisTD).attr({"src":bestImages[data],"title":bestTooltip[data]});
				}
			}
		});			 
	});
});
</script>
<!-- 主页面结束 -->

